From: Florian Müllner Date: Sun, 27 Jan 2019 00:15:31 +0000 (+0100) Subject: lint: Tweak the whitelist of globals X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~47 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4c0bd88a2c566b2f3f9744972b6dd10d06a00b2b;p=gnome-shell.git lint: Tweak the whitelist of globals gjs doesn't include any gettext wrappers, and obviously can't know about the shell's global object, so include those in the list of globals for all sources in the gnome-shell context. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/609 --- diff --git a/.eslintrc.json b/.eslintrc.json index 255b0f2f8..30afb5924 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,5 +1,6 @@ { "extends": [ - "./lint/eslintrc-gjs.json" + "./lint/eslintrc-gjs.json", + "./lint/eslintrc-shell.json" ] } diff --git a/lint/eslintrc-shell.json b/lint/eslintrc-shell.json new file mode 100644 index 000000000..f59417c44 --- /dev/null +++ b/lint/eslintrc-shell.json @@ -0,0 +1,15 @@ +{ + "overrides": [ + { + "files": "js/**", + "excludedFiles": ["js/extensionPrefs/*", "js/portalHelper/*"], + "globals": { + "global": false, + "_": false, + "C_": false, + "N_": false, + "ngettext": false + } + } + ] +}